
# MAINTAINER        Cheng Gang <chengang@xyd.cn>
# DOCKER-VERSION    1.12.6#
# Dockerizing AmazonLinux: Dockerfile for building AmazonLinux images



FROM  registry.cn-hangzhou.aliyuncs.com/xyd/gunicorn-python3:latest

ENV AWS_DEFAULT_REGION cn-north-1

RUN yum -y install git && \
    yum -y install gcc libffi-devel  openssl-devel && \
    yum clean all

RUN pip-3.5 install django==1.10.5  pymysql==0.7.9  botocore==1.5.38 boto3==1.4.4 django-redis==4.7.0 djangorestframework==3.5.4 requests && \
    pip-3.5 install django-celery==3.2.1 arrow==0.10.0 coreapi django-rest-swagger influxdb==4.1.1

RUN mkdir /tmp/log/xyd_monitor/ -p


ADD docker_file/supervisor_gunicorn.ini /etc/supervisord.d/
ADD docker_file/gunicorn.config.py  /gunicorn.config.py
ADD docker_file/init.sh  /init.sh

RUN chmod +x  /init.sh

EXPOSE 80

ADD . /app

ENTRYPOINT ["sh","/init.sh","/usr/local/bin/supervisord", "-n", "-c", "/etc/supervisord.ini"]







